﻿using DoveyAttribute.EnumExtend;
using DoveyAttribute.ValidateExtend;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DoveyAttribute
{
    class Program
    {
        static void Main(string[] args)
        {
            {
                //Student stu = new Student()
                //{

                //};
            }

            {
                // 封装enum
                //UserState userState = UserState.Frozen; // -- 界面展示“已冻结”
                //var remark = AttributeExtend.GetRemark(userState);
                //Console.WriteLine(remark);
                //Console.WriteLine(userState.GetRemark());
            }

            {
                // 利用特性封装验证
                StudentVIP studentVIP = new StudentVIP() {
                    Height = 150,
                    Id = 123,
                    Name = "VIP",
                    VIPGroup="G1"
                };

                if (studentVIP.Validate())
                {
                    Console.WriteLine("success");
                };
            }
        }
    }
}
